package cn.edu.xjtu.data_structure.chapter01_linearlist.linkedlist;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/9/9 9:37
 */
public class Link <E> {
    //单链表结点类
    private E element;
    private Link next; //指向的下一个结点
    //构造方法
    public Link(E element, Link next) {
        this.element = element;
        this.next = next;
    }

    public Link(Link next) {
        this.next = next;
    }
    //getter和setter
    public E getElement() {
        return element;
    }

    public void setElement(E element) {
        this.element = element;
    }

    public Link getNext() {
        return next;
    }

    public void setNext(Link next) {
        this.next = next;
    }
}
